package main

import (
	"fmt"
	"fyne.io/fyne/v2/app"
)
/*
 fyne 中用于配置一些引用的配置信息
*/

func main() {
	// globally unique to this app
	a := app.NewWithID("preference.com")

	key := "demokey"
	// Preferences returns the application preferences, used for storing configuration and state
	a.Preferences().SetString(key, "somevalue")
	// String looks up a string value for the key
	val := a.Preferences().String(key)
	fmt.Println("Value is:", val)
	// 移除 key值
	a.Preferences().RemoveValue(key)
	val = a.Preferences().String(key)
	fmt.Println("Value is:", val)
}
